#include "expression_tree.h"
#include "expression_root.h"
#include "skeleton.h"
#include "model.h"

using namespace krryn::animation;
using namespace krryn::view;

expression_tree::expression_tree(model &a_Model) : m_Model(a_Model){
	int l_NumJoints = a_Model.get_bindpose()->num_joints();

	m_Root    = new expression_root();
	m_Result  = new skeleton(l_NumJoints);
	m_Scratch = new skeleton(l_NumJoints);
}

void expression_tree::update(float a_DT){
	m_Root->blend(a_DT, m_Result);
}